//
//  sizeConfig.h
//  ExhibitionHall
//
//  Created by 王洋 on 2019/5/28.
//  Copyright © 2019 王洋. All rights reserved.
//

#ifndef sizeConfig_h
#define sizeConfig_h

#pragma mark  ------GLOBAL------DEFAULT------SIZE------


#define  TTScreenWidth      [UIScreen mainScreen].bounds.size.width
#define  TTScreenHeight     [UIScreen mainScreen].bounds.size.height

#define SCREEN_MAX_LENGTH (MAX(TTScreenWidth, TTScreenHeight))
#define SCREEN_MIN_LENGTH (MIN(TTScreenWidth, TTScreenHeight))

#define IS_IPAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
#define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
#define IS_RETINA ([[UIScreen mainScreen] scale] >= 2.0)

#define IS_IPHONE_4_OR_LESS (IS_IPHONE && SCREEN_MAX_LENGTH < 568.0)
#define IS_IPHONE_5 (IS_IPHONE && SCREEN_MAX_LENGTH == 568.0)
#define IS_IPHONE_6 (IS_IPHONE && SCREEN_MAX_LENGTH == 667.0)
#define IS_IPHONE_6P (IS_IPHONE && SCREEN_MAX_LENGTH == 736.0)
#define IS_IPHONE_X  kIs_iPhoneX
//判断设备版本
#define IOS7 ([[UIDevice currentDevice].systemVersion floatValue]>=7.0&&[[UIDevice currentDevice].systemVersion floatValue]<8.0)
#define IOS8 ([[UIDevice currentDevice].systemVersion floatValue]>=8.0)
#define IOS9 ([[UIDevice currentDevice].systemVersion floatValue]>=9.0)
#define IOS10 ([[UIDevice currentDevice].systemVersion floatValue]>=10.0)
#define IOS11 ([[UIDevice currentDevice].systemVersion floatValue]>=11.0)


#define kIs_iphone (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
#define kIs_iPhoneX TTScreenWidth >=375.0f && TTScreenHeight >=812.0f&& kIs_iphone

/*状态栏高度*/
#define kStatusBarHeight (CGFloat)(kIs_iPhoneX?(44.0):(20.0))
/*导航栏高度*/
#define kNavBarHeight (44)
/*状态栏和导航栏总高度*/
#define kNavBarAndStatusBarHeight (CGFloat)(kIs_iPhoneX?(88.0):(64.0))
/*TabBar高度*/
#define kTabBarHeight (CGFloat)(kIs_iPhoneX?(49.0 + 34.0):(49.0))
/*顶部安全区域远离高度*/
#define kTopBarSafeHeight (CGFloat)(kIs_iPhoneX?(44.0):(0))
/*底部安全区域远离高度*/
#define kBottomSafeHeight (CGFloat)(kIs_iPhoneX?(34.0):(0))
/*iPhoneX的状态栏高度差值*/
#define kTopBarDifHeight (CGFloat)(kIs_iPhoneX?(24.0):(0))
/*导航条和Tabbar总高度*/
#define kNavAndTabHeight (kNavBarAndStatusBarHeight + kTabBarHeight)


#define PP_Global_Collection_Distance   1

#define PP_Home_Banner_Scale        0.4  //首页banner比例
#define PP_Home_Banner_ItemHeight   PP_Home_Banner_Scale * TTScreenWidth

#define PP_Home_MsgNoti_ItemHeight      0

#define PP_Home_MainIcon_Scale      1.0   //mainIcon 比例
#define PP_Home_MainIcon_Distance   0.5   //mainicon 间隙


#define homeMainIconHeight     (TTScreenWidth - 4)/4 + 2    //后期根据数据计算其高度
#define homeNormalImageHeight     40



#pragma mark  ------GLOBAL------DEFAULT------COLOR------


//默认背景灰色
#define PP_Default_Color_Gray_F1F1F1     UIColorHex(0xf1f1f1)


#define PP_Default_Color_Red_FF3737      UIColorHex(0xff3737)


#define PP_Default_Color_Orange_E8AC44      UIColorHex(0xE8AC44)


#define PP_Default_Color_Black_333333      UIColorHex(0x333333)

#endif /* sizeConfig_h */
